- zero_balance_row = @dates.all? do |date|
  - date_range = action_name == 'balance_sheet' ? date.last : date
  - account.saldo(date_range) == 0.0

%tr[account]{:class => (zero_balance_row ? 'zero-balance' : '')}
  %td= account.code
  %td= account.title

  - for date in @dates
    - date_range = action_name == 'balance_sheet' ? date.last : date
    %td.right
      = link_to currency_fmt(account.saldo(date_range)), account_path(account, :by_date => {:from => date.first.to_s(:db), :to => date.last.to_s(:db)}), 'data-href-container' => 'tr'
